export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'facilitator', 'higher', 'member', 'general'],
    routes: [
      // dashboard
      { path: '/', redirect: '/workplace/workplace' },
      // workplace
      {
        path: '/workplace/workplace',
        authority: ['admin', 'facilitator', 'higher', 'member', 'general'],
        component: './workplace/workplace',
      },
      // dashboard
      {
        path: '/dashboard/analysis',
        name: 'dashboard',
        icon: 'dashboard',
        authority: ['admin'],
        component: './dashboard/Analysis',
      },
      // 服务商明细
      {
        path: '/facilitatorStore/profile',
        name: 'profile',
        icon: 'profile',
        authority: ['facilitator'],
        component: './facilitatorStore/profile',
      },
      // 商户管理
      {
        path: '/facilitatorStore/facilitatorStore',
        name: 'facilitatorStore',
        icon: 'profile',
        authority: ['facilitator'],
        component: './facilitatorStore/facilitatorStore',
      },
      // 分类管理
      {
        path: '/Classify/Classify',
        name: 'classify',
        icon: 'profile',
        authority: ['admin'],
        component: './Classify/Classify',
      },
      // 城市管理
      {
        path: '/configuration/storeCity',
        name: 'storeCity',
        icon: 'profile',
        authority: ['admin'],
        component: './configuration/storeCity',
      },
      // list
      {
        path: '/Providers',
        name: 'basiclist',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/Providers/basic-list',
            name: 'basiclist',
            authority: ['admin'],
            component: './Providers/BasicList',
          },
          {
            path: '/Providers/divided',
            name: 'divided',
            authority: ['admin'],
            component: './Providers/divided',
          },
        ],
      },
      // 商户管理
      {
        path: '/facilitator',
        name: 'facilitator',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/facilitator/facilitator',
            name: 'facilitator',
            authority: ['admin', 'facilitator'],
            component: './facilitator/facilitator',
          },
          {
            path: '/facilitator/facilitatorAudit',
            name: 'facilitatorAudit',
            authority: ['admin'],
            component: './facilitator/facilitatorAudit',
          },
        ],
      },
      // 订单管理
      {
        path: '/order/order',
        name: 'order',
        icon: 'profile',
        authority: ['admin'],
        component: './order/order',
      },
      {
        path: '/financial/financial',
        name: 'financial',
        icon: 'profile',
        authority: ['admin'],
        component: './financial/financial',
      },
      // 日志信息
      {
        path: '/diary',
        name: 'diary',
        icon: 'profile',
        authority: ['higher', 'facilitator'],
        routes: [
          // profile
          {
            path: '/diary/diary',
            name: 'diary',
            component: './diary/diary',
          },
          {
            path: '/diary/team',
            name: 'team',
            component: './diary/team',
          },
        ],
      },
      //商品
      {
        path: '/commodity',
        name: 'commodity',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/Commodity/Commodity',
            name: 'commodity',
            component: './Commodity/Commodity',
          },
          {
            path: '/Commodity/audit',
            name: 'audit',
            component: './Commodity/audit',
          },
          {
            path: '/Commodity/Platform',
            name: 'platform',
            component: './Commodity/Platform',
          },
        ],
      },
      //商品管理
      {
        path: '/commodityByMerchant/commodityByMerchant',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './commodityByMerchant/commodityByMerchant',
      },
      //提现管理
      {
        path: '/detailsByMerchant/detailsByMerchant',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './detailsByMerchant/detailsByMerchant',
      },
      //商户路由管理
      {
        path: '/merchant/merchant',
        name: 'merchant',
        icon: 'profile',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './merchant/merchant',
      },
      //优惠券管理
      {
        path: '/couponsByMerchant/couponsByMerchant',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './couponsByMerchant/couponsByMerchant',
      },
      //商户订单管理
      {
        path: '/orderByMerchant/orderByMerchant',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './orderByMerchant/orderByMerchant',
      },
      //商户订单管理2
      {
        path: '/orderByMerchantB/orderByMerchantB',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './orderByMerchantB/orderByMerchantB',
      },
      //商户基础设置管理
      {
        path: '/setByMerchant/setByMerchant',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './setByMerchant/setByMerchant',
      },
      //绑定支付宝
      {
        path: '/bindAlipayOrbankCard/bindAlipayOrbankCard',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './bindAlipayOrbankCard/bindAlipayOrbankCard',
      },
      //在途佣金日志
      {
        path: '/incomeByStoreId/incomeByStores',
        authority: ['admin', 'general', 'higher', 'facilitator', 'member'],
        component: './incomeByStoreId/incomeByStores',
      },
      // 用户管理
      {
        path: '/subscriber',
        name: 'subscriber',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/subscriber/coupons',
            name: 'coupons',
            component: './Subscriber/coupons',
          },
          {
            path: '/subscriber/common',
            name: 'common',
            component: './Subscriber/Common',
          },
          {
            path: '/subscriber/member',
            name: 'member',
            component: './Subscriber/Member',
          },
          {
            path: '/subscriber/higher',
            name: 'higher',
            component: './Subscriber/Higher',
          },
          {
            path: '/subscriber/advertisement',
            name: 'advertisement',
            component: './Subscriber/Advertisement',
          },
          {
            path: '/subscriber/memberCommissionRatio',
            name: 'memberCommissionRatio',
            component: './Subscriber/memberCommissionRatio',
          },
        ],
      },
      //平台角色
      {
        path: '/admin/admin',
        name: 'admin',
        icon: 'profile',
        authority: ['admin'],
        component: './admin/admin',
      },
      //审核管理
      {
        path: '/Withdrawal/Withdrawal',
        name: 'withdrawal',
        icon: 'profile',
        authority: ['admin'],
        component: './Withdrawal/Withdrawal',
      },
      // 在途佣金显示
      {
        path: '/income',
        name: 'income',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/income/incomeByUser',
            name: 'incomeByUser',
            component: './income/incomeByUser',
          },
          {
            path: '/income/incomeByStores',
            name: 'incomeByStores',
            component: './income/incomeByStores',
          },
        ],
      },
      // 图片管理pictures
      {
        path: '/content',
        name: 'content',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/content/toppictures',
            name: 'toppictures',
            component: './Content/TopPictures',
          },
          {
            path: '/content/bottompictures',
            name: 'bottompictures',
            component: './Content/BottomPictures',
          },
        ],
      },
      // 内容管理
      {
        path: '/pictures',
        name: 'pictures',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/pictures/pictures',
            name: 'pictures',
            component: './pictures/pictures',
          },
          // {
          //   path: '/pictures/projects',
          //   name: 'projects',
          //   component: './pictures/projects',
          // },
        ],
      },
      //系统配置
      {
        path: '/configuration',
        name: 'configuration',
        icon: 'profile',
        authority: ['admin'],
        routes: [
          // profile
          {
            path: '/configuration/coupons',
            name: 'coupons',
            component: './configuration/coupons',
          },
          {
            path: '/configuration/about',
            name: 'about',
            component: './configuration/about',
          },
          {
            path: '/configuration/servicetel',
            name: 'servicetel',
            component: './configuration/servicetel',
          },
          {
            path: '/configuration/sharePictures',
            name: 'sharePictures',
            component: './configuration/sharePictures',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
